xen/pvshim: keep track of used PFN ranges
authorWei Liu <wei.liu2@citrix.com>
Wed, 3 Jan 2018 16:50:24 +0000 (16:50 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 16 Jan 2018 18:34:04 +0000 (18:34 +0000)
commitb95c86b01a8e25b72f3e1a1395c1b544a006abdb
tree46cf17185eda55ec2d8304a5d37869be490c90bc
parent770e5c7f62ffbe628f99d454dc4dd6cb96e26f36
xen/pvshim: keep track of used PFN ranges

Simple infrastructure to keep track of PFN space usage, so that we can
use unpopulated PFNs to map special pages like shared info and grant
table.

As rangeset depends on malloc being ready so hypervisor_setup is
introduced for things that can be initialised late in the process.

Note that the PFN is marked as reserved at least up to 4GiB (or more
if the guest has more memory). This is not a perfect solution but
avoids using the MMIO hole below 4GiB. Ideally the shim (L1) should
have a way to ask the underlying Xen (L0) which memory regions are
populated, unpopulated, or MMIO space.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/guest/xen.c
xen/arch/x86/setup.c
xen/include/asm-x86/guest/xen.h